/**
 @file drv_lib.h

 @date 2010-02-25

 @version v5.1

 The file implement include all driver .h files
*/

#ifndef _DRV_LIB_H_
#define _DRV_LIB_H_

/* humber driver's include file */
#include "greatbelt/include/drv_cfg.h"
#include "greatbelt/include/drv_enum.h"
#include "greatbelt/include/drv_common.h"
#include "greatbelt/include/drv_tbl_reg.h"
#include "greatbelt/include/drv_hash_lookup.h"
#include "greatbelt/include/drv_fib_lookup.h"
#include "greatbelt/include/drv_lpm_lookup.h"
#include "greatbelt/include/drv_userid_lookup.h"
#include "greatbelt/include/drv_queue_lookup.h"
#include "greatbelt/include/drv_hash_calculate.h"
#include "greatbelt/include/drv_hash_db.h"
#include "greatbelt/include/drv_chip_hash.h"
#include "greatbelt/include/drv_model_hash.h"
#include "greatbelt/include/drv_chip_info.h"
#include "greatbelt/include/drv_io.h"
#include "greatbelt/include/drv_error.h"
#include "greatbelt/include/drv_model_io.h"
#include "greatbelt/include/drv_chip_io.h"
#include "greatbelt/include/drv_ecc_recover.h"

#define SET_BIT(flag, bit)      (flag) = (flag) | (1 << (bit))
#define CLEAR_BIT(flag, bit)    (flag) = (flag) & (~(1 << (bit)))
#define IS_BIT_SET(flag, bit)   (((flag) & (1 << (bit))) ? 1 : 0)

#define SET_BIT_RANGE(dst, src, s_bit, len) \
    { \
        uint8 i = 0; \
        for (i = 0; i < len; i++) \
        { \
            if (IS_BIT_SET(src, i)) \
            { \
                SET_BIT(dst, (s_bit + i)); \
            } \
            else \
            { \
                CLEAR_BIT(dst, (s_bit + i)); \
            } \
        } \
    }

/**********************************************************************************
              Define Typedef, define and Data Structure
***********************************************************************************/
/**********************************************************************************
                      Define API function interfaces
***********************************************************************************/

#endif  /*end of _DRV_HUMBER_LIB_H_*/

